#!/bin/sh

searchBinFiles ()
{
  OLDVAR=$1
  BINDIR=$2
  #mkdir $BINDIR
  grep  $OLDVAR $BINDIR/*
}


OLDVAR=$1
  echo "Searching $OLDVAR"
  INFILE=/etc/sipman.conf
  echo "Searching $INFILE"
  grep $OLDVAR $INFILE
  for DIR in /var/sipman3/main/bin /var/sipman3/main/plugins /var/sipman3/main/cgi-bin
  do
    echo "Processing dir $DIR"
    searchBinFiles $OLDVAR $DIR
  done
